package com.icinfo.cloud.provider.punish.api.controller;

import com.icinfo.cloud.provider.common.constant.Constant;
import com.icinfo.cloud.provider.punish.common.caseregister.service.IRegisterCommonService;
import com.icinfo.framework.common.web.Result;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 描述：对外部提供的获取用户签名Controller
 *
 * @author zhengqiang
 * @date 2022/8/18
 */
@RestController
@RequestMapping("/punish/api/sign")
public class UserSignShareController {
    @Resource
    private IRegisterCommonService registerCommonService;

    /**
     * 描述： 查询用户签名base64图片
     *
     * @author: zhengqiang
     * @date: 2022/8/18
     * @param: userId
     * @return {@link Result< String>}
     **/
    @GetMapping(value = "/getUserSignData")
    public Result<String> getUserSignData(@RequestParam("userId") String userId){
        String handleSignData = registerCommonService.getHandleSignData(userId);
        return Result.success(Constant.STRING_SUCCESS_EN, handleSignData);
    }

}
